You are here: Statements and Functions > FreeCap()
Syntax samples
FREECAP(<location>)
SEND FREECAP(Loc1) EntA TO Loc1
Returns the available capacity of a location. This function returns an integer.
Any logic and any field except those fields evaluated only at translation time. For a list of fields evaluated only at translation time, see the Appendix A.
Components
<location>
The name of the location to examine. The LOC() function may also be used here.
Example
Suppose the entities, Plates and Cams, travel through an assembly line. The location, Assembly (capacity=1) joins Cams with the Plates. When a Cam finishes processing at Station2, it should not enter Station3 unless a Plate is waiting to join with it further down the assembly line at Assembly. If there is no Plate at Assembly, another location, Buffer, sends one. The logic for Cam at Station2 is as follows:
IF FREECAP(Assembly) = 1 THEN
SEND 1 Plate TO Assembly
CAP().